







Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
[SerializableAttribute] public class OrderedDictionary<TKey, TValue> : DictionaryBase<TKey, TValue>, ICloneable |
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ Public Class OrderedDictionary(Of TKey, TValue) _ Inherits DictionaryBase(Of TKey, TValue) _ Implements ICloneable |
Visual C++ |
---|
[SerializableAttribute] generic<typename TKey, typename TValue> public ref class OrderedDictionary : public DictionaryBase<TKey, TValue>, ICloneable |
Type Parameters
- TKey
- TValue
Remarks
The keys are compared in one of three ways. If TKey implements IComparable<TKey> or IComparable, then the CompareTo method of that interface will be used to compare elements. Alternatively, a comparison function can be passed in either as a delegate, or as an instance of IComparer<TKey>.
OrderedDictionary is implemented as a balanced binary tree. Inserting, deleting, and looking up an an element all are done in log(N) type, where N is the number of keys in the tree.
Dictionary<(Of <TKey, TValue>)> is similar, but uses hashing instead of comparison, and does not maintain the keys in sorted order.
Inheritance Hierarchy
Wintellect.PowerCollections..::CollectionBase<(Of <KeyValuePair<(Of <TKey, TValue>)>>)>
Wintellect.PowerCollections..::DictionaryBase<(Of <TKey, TValue>)>
Wintellect.PowerCollections..::OrderedDictionary<(Of <TKey, TValue>)>